home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++)))) RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWBTree - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- #include <rw/btree.h>
-
-
-
- RWBTree a;
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- Class RRRRWWWWBBBBTTTTrrrreeeeeeee represents a group of ordered elements, not accessible by
- an external key. Duplicates are not allowed. An object stored by class
- RRRRWWWWBBBBTTTTrrrreeeeeeee must inherit abstract base class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee -- the elements
- are ordered internally according to the value returned by virtual
- function ccccoooommmmppppaaaarrrreeeeTTTToooo(((()))) (see class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee). This class has certain
- advantages over class RRRRWWWWBBBBiiiinnnnaaaarrrryyyyTTTTrrrreeeeeeee. First, the B-tree is automatically
- bbbbaaaallllaaaannnncccceeeedddd. (With class RRRRWWWWBBBBiiiinnnnaaaarrrryyyyTTTTrrrreeeeeeee, you must call member function
- bbbbaaaallllaaaannnncccceeee(((()))) explicitly to balance the tree.) Nodes are never allowed to
- have less than a certain number of items (called the oooorrrrddddeeeerrrr). The default
- order is 50, but may be changed by resetting the value of the static
- constant "oooorrrrddddeeeerrrr" in the header file <<<<bbbbttttrrrreeeeeeee....hhhh>>>> and recompiling. Larger
- values will result in shallower trees, but less efficient use of memory.
- Because many keys are held in a single node, class RRRRWWWWBBBBTTTTrrrreeeeeeee also tends to
- fragment memory less.
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
- Polymorphic
-
- PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
- RRRRWWWWBBBBTTTTrrrreeeeeeee();
-
-
- Construct an empty B-tree.
-
- RRRRWWWWBBBBTTTTrrrreeeeeeee(const RWBTree& btr);
-
-
- Construct self as a shallow copy of bbbbttttrrrr.
-
- Public Destructor
- virtual
- ~RRRRWWWWBBBBTTTTrrrreeeeeeee();
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++)))) RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++))))
-
-
-
- Redefined from RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn. Calls cccclllleeeeaaaarrrr(((()))).
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr OOOOppppeeeerrrraaaattttoooorrrrssss
- void
- ooooppppeeeerrrraaaattttoooorrrr====(const RWBTree& btr);
-
-
- Set self to a shallow copy of bbbbttttrrrr.
-
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr<<<<====(const RWBTree& btr) const;
-
-
- Returns TTTTRRRRUUUUEEEE if self is a subset of bbbbttttrrrr. That is, for every item in
- self, there must be an item in bbbbttttrrrr that compares equal. NNNNooootttteeee: If you
- inherit from RRRRWWWWBBBBTTTTrrrreeeeeeee in the presence of the Standard C++ Library, we
- recommend that you override this operator and explicitly forward the
- call. Overload resolution in C++ will choose the Standard Library
- provided global operators over inherited class members. These global
- definitions are not appropriate for set-like partial orderings.
-
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWBTree& btr) const;
-
-
- Returns TTTTRRRRUUUUEEEE if self and bbbbttttrrrr are equivalent. That is, they must have the
- same number of items and for every item in self, there must be an item in
- bbbbttttrrrr that compares equal.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
- virtual void
- aaaappppppppllllyyyy(RWapplyCollectable ap, void*);
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn to apply the user-supplied function
- pointed to by aaaapppp to each member of the collection, in order, from
- smallest to largest. This supplied function should not do anything to
- the items that could change the ordering of the collection.
-
- virtual RWspace
- bbbbiiiinnnnaaaarrrryyyySSSSttttoooorrrreeeeSSSSiiiizzzzeeee() const;
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
- virtual void
- cccclllleeeeaaaarrrr();
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++)))) RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++))))
-
-
-
- virtual void
- cccclllleeeeaaaarrrrAAAAnnnnddddDDDDeeeessssttttrrrrooooyyyy();
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
- virtual int
- ccccoooommmmppppaaaarrrreeeeTTTToooo(const RWCollectable* a) const;
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.
-
- virtual RWBoolean
- ccccoooonnnnttttaaaaiiiinnnnssss(const RWCollectable* target) const;
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
- virtual size_t
- eeeennnnttttrrrriiiieeeessss() const;
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
- virtual RWCollectable*
- ffffiiiinnnndddd(const RWCollectable* target) const;
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn. The first item that compares equal to
- the object pointed to by ttttaaaarrrrggggeeeetttt is returned or nnnniiiillll if no item is found.
-
- virtual unsigned
- hhhhaaaasssshhhh() const;
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.
-
- unsigned
- hhhheeeeiiiigggghhhhtttt() const;
-
-
- Special member function of this class. Returns the height of the tree,
- defined as the number of nodes traversed while descending from the root
- node to an external (leaf) node.
-
- virtual RWCollectable*
- iiiinnnnsssseeeerrrrtttt(RWCollectable* c);
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn. Inserts the item cccc into the
- collection and returns it. The item cccc is inserted according to the value
- returned by ccccoooommmmppppaaaarrrreeeeTTTToooo(((()))). If an item is already in the collection which
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++)))) RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++))))
-
-
-
- iiiissssEEEEqqqquuuuaaaallll to cccc, then the old item is returned and the new item is not
- inserted. Otherwise returns nnnniiiillll if the insertion was unsuccessful.
-
- virtual RWClassID
- iiiissssAAAA() const;
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee to return ________RRRRWWWWBBBBTTTTRRRREEEEEEEE.
-
- virtual RWBoolean
- iiiissssEEEEmmmmppppttttyyyy() const;
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
- virtual RWBoolean
- iiiissssEEEEqqqquuuuaaaallll(const RWCollectable* a) const;
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.
-
- virtual size_t
- ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(const RWCollectable* target) const;
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn. Returns the number of items that
- compare equal to ttttaaaarrrrggggeeeetttt. Since duplicates are not allowed, this function
- can only return 0 or 1.
-
- virtual RWCollectable*
- rrrreeeemmmmoooovvvveeee(const RWCollectable* target);
-
-
- Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn. Removes and returns the first item
- that compares equal to the object pointed to by ttttaaaarrrrggggeeeetttt. Returns nnnniiiillll if
- no item was found.
-
- virtual void
- rrrreeeemmmmoooovvvveeeeAAAAnnnnddddDDDDeeeessssttttrrrrooooyyyy(const RWCollectable* target);
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
- virtual void
- rrrreeeessssttttoooorrrreeeeGGGGuuuuttttssss(RWvistream&);
- virtual void
- rrrreeeessssttttoooorrrreeeeGGGGuuuuttttssss(RWFile&);
- virtual void
- ssssaaaavvvveeeeGGGGuuuuttttssss(RWvostream&) const;
- virtual void
- ssssaaaavvvveeeeGGGGuuuuttttssss(RWFile&) const;
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++)))) RRRRWWWWBBBBTTTTrrrreeeeeeee((((3333CCCC++++++++))))
-
-
-
- Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
-
- RWStringID
- ssssttttrrrriiiinnnnggggIIIIDDDD();
-
-
- (acts virtual) Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-